#!/bin/sh
#
# Start....
#

start() {
    printf "open asound......\n"
    tinymix set 0 35 #set default volume
    tinymix set 14 1 #enable dac
    tinymix set 16 1 #enable pa
}

stop() {
    printf "close asound......\n"
    tinymix set 0 0 #set default volume
    tinymix set 14 0 #enable dac
    tinymix set 16 0 #enable pa
}

case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    restart|reload)
    stop
    sleep 1
    start
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac

exit $?
